package brickdestroyer.math;

/**
 * This class defines a shape positioned in 2d space.
 * <p>Classes mush extends this class in order to be
 * applicable for collision detection / checking.
 *
 * @author Momchil Atanasov
 */
public abstract class Shape2D extends Vector2D {
    
    public Shape2D() {
        super();
    }
    
    public Shape2D(float x, float y) {
        super(x, y);
    }

    public Shape2D(Vector2D position) {
        super(position);
    }
    
    public Shape2D(Shape2D other) {
        this(other.x, other.y);
    }

    /**
     * This method determines the smalles distance from the
     * center of the object to it's farthest corner.
     * @return distance to the farthest corner
     */
    public abstract float getSmallestSize();

    /**
     * This method determines the left-most X coordinate
     * that this object occupies.
     * @return left-most X coordinate occupied by this shape
     */
    public abstract float getMinX();

    /**
     * This method determines the right-most X coordinate
     * that this object occupies.
     * @return right-most X coordinate occupied by this shape
     */
    public abstract float getMaxX();

    /**
     * This method determines the top-most Y coordinate
     * that this object occupies.
     * @return top-most Y coordinate occupied by this shape.
     */
    public abstract float getMinY();

    /**
     * This method determines the bottom-most Y coordinate
     * that this object occupies.
     * @return bottom-most Y coordinate occupied by this shape.
     */
    public abstract float getMaxY();
}
